//
//  IDSearchViewController.m
//  查询工具
//
//  Created by student on 16/3/29.
//  Copyright © 2016年 wk. All rights reserved.
//

#import "IDSearchViewController.h"
#import "NetManager.h"

@interface IDSearchViewController ()
@property (weak, nonatomic) IBOutlet UITextField *IDTextFiled;

@property (weak, nonatomic) IBOutlet UITextView *resultTextView;
@end

@implementation IDSearchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}
- (IBAction)searchPressed:(id)sender {
    [NetManager requestInfoByPersonID:self.IDTextFiled.text
                         successBlock:^(NSString *result) {
                             self.resultTextView.text = result;
                         }
                            failBlock:^(NSError *error) {
                                self.resultTextView.text = [error localizedDescription];
                            }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
